package com.starlink.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.starlink.common.annotation.client.weixin.UserPurchaseRes;
import com.starlink.model.vo.mall.WeixinRefundOrderVO;
import org.springframework.data.domain.Pageable;
import com.starlink.model.domain.DepositRecordDO;
import com.starlink.model.request.DepositRecordRequest;
import com.starlink.model.vo.DepositRecordVO;

import java.util.List;

/**
 * @author zhanghong
 */
public interface DepositRecordService extends IService<DepositRecordDO> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
    DepositRecordVO getByKey(long id);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfo<DepositRecordVO> pageQuery(Pageable pageable,DepositRecordRequest request);
    /**
     * 列表查询
     * @param request
     * @return
     */
    List<DepositRecordVO> listQuery(DepositRecordRequest request);
    /**
     * 新增押金记录
     * @param request
     * @return
     */
    Boolean add(DepositRecordRequest request);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    Boolean updateByKey(DepositRecordRequest request);
    /**
     * 根据主键删除
     * @param ids
     * @return
     */
    Boolean deleteDOByIds(String ids);

    /**
     * 押金充值
     * @param request
     * @return
     */
    UserPurchaseRes depositCharge(DepositRecordRequest request);

    DepositRecordVO getDeposit(DepositRecordRequest request);

    /**
     * 押金退款
     * @param request
     * @return
     */
    Boolean depositRefund(DepositRecordRequest request);
}
